package com.bonuo.crm.service.impl;

import com.bonuo.crm.domain.Invoice;
import com.bonuo.crm.mapper.InvoiceMapper;
import com.bonuo.crm.service.InvoiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class InvoiceServiceImpl implements InvoiceService {
    @Autowired
    private InvoiceMapper invoiceMapper;
    @Override
    public List<Invoice> selectInvoiceList(Invoice invoice) {
        return invoiceMapper.selectInvoiceList(invoice);
    }

    @Override
    public Integer addInvoice(Invoice invoice) {
        return invoiceMapper.addInvoice(invoice);
    }

    @Override
    public Integer updateInvoice(Invoice invoice) {
        return invoiceMapper.updateInvoice(invoice);
    }

    @Override
    public Integer deleteInvoice(Integer id) {
        return invoiceMapper.deleteInvoice(id);
    }

    @Override
    public BigDecimal selectAmount(Integer projectId) {
        return invoiceMapper.selectAmount(projectId);
    }
}
